fix(deploy): build+wire sms-service, and give security the email/SMS/verification env it needs - #288
Merged
Merged
Conversation
…on env WIP checkpoint. [skip ci] Co-Authored-By: Claude <claude-opus-4-8> <noreply@anthropic.com> Claude-Session-Id: cf830721-b1ef-4fe0-a024-035ad280dcf7
…verification env it needs The release bump step's awk anchor list covered 5 images while the workflow BUILDS 7. email-service and sms-service were built and pushed on every release but their values-prod.yaml tags were never rewritten, and the count guard could not catch it (5 anchors == 5 rewrites == pass). Result: email-service froze at a stale SHA and sms-service kept tag "" — never deployed at all. - release.yml: anchor email-service + sms-service, guard 5 -> 7. - security.yaml: add EMAIL_SERVICE_URL / SMS_SERVICE_URL (rendered from the same values the Services use) + REQUIRE_EMAIL_VERIFICATION from values. The code's fallbacks (http://email-service:3000) match neither the real Service names nor ports, so they never resolved. - sms/email-service.yaml: gate Twilio/SendGrid env on existingSecret too — prod keeps those values empty by design, so the inline-only gate stripped Twilio env in exactly the env that needs it. - values-prod.yaml: requireEmailVerification: false (email path unproven). Co-Authored-By: Claude <claude-opus-4-8> <noreply@anthropic.com> Claude-Session-Id: cf830721-b1ef-4fe0-a024-035ad280dcf7
Contributor
Automated code review (gate-code-review)Credit balance is too low Report-only — this check never blocks merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two merged features (phone 2FA #274, email verification #275) are non-functional in prod because the deploy wiring was never completed. This is the deploy/CI slice only — no app code touched.
Root cause: the release bump silently skipped 2 of 7 images
release.ymlbuilds and pushes 7 images, but the tag-bumpawkonly anchored 5 (backend, frontend, security, applications, clock-app).email-serviceandsms-servicewere built on every release and then never written intovalues-prod.yaml.The count guard could not catch this — it asserted
COUNT -ne 5, and 5 anchors always produce exactly 5 rewrites. It was structurally incapable of noticing the two missing ones. Consequences:smsService.image.tag: ""→ an empty tag, so sms-service was never deployed at all. Phone 2FA could not dispatch even though its routes answered.emailService.image.tagfroze at a stale1fbd206c5b2awhile the built image moved on.Fixed by anchoring both repositories and raising the guard to 7, with a comment tying the anchor list to the build steps.
Also found while wiring (both would have defeated the fix)
emailService.enabledwas never set invalues-prod.yaml— it defaults tofalse, so email-service was not merely stale, it was not deployed. Nowenabled: true..Values.secret.twilioAccountSid, which is empty in prod by design (real values live in the SealedSecret, prod usesexistingSecret). So the gate stripped Twilio env in exactly the environment that needs it. Now gated onexistingSecrettoo. Verified: all 3 Twilio keys render only after this fix.notifications.tsdefaults tohttp://email-service:3000/http://sms-service:3000— matching neither the real Service names (fuzefront-email-service/fuzefront-sms-service) nor ports (3003/3004). The env is now rendered from the same values the Services are built from, so a port change cannot drift them apart.Deliberate: two things stay OFF
requireEmailVerification: false. Enabling it now would lock out every new signup: noSMTP_HOSTis wired, so email-service defaults to a mailhog-stylelocalhost:1025and silently drops mail. Users would be created unverified and never receive the mail to verify. Prove a sender first, then flip. (Note: while false, the code auto-verifies everyone — verification is not enforced today either way.)smsService.enabled: false. Enabling it now would CrashLoop the pod:SMS_AUTH_SECRETis a hardsecretKeyRef(nooptional), and none of the 4 required keys exist infuzefront-secrets(verified against the sealed manifest). The empty tag was hiding this.This PR does not make either feature live — it makes them deployable. Go-live is owner-gated on sealing (below), then a GitOps flip in a deploy window.
Owner action required (I cannot do this — no credentials, and I will not commit secrets)
Seal 4 keys into
fuzefront-secrets, per the new recipe indeploy/contabo/SEAL_PROD_SECRETS.md:TWILIO_ACCOUNT_SIDAC…)TWILIO_AUTH_TOKENTWILIO_VERIFY_SERVICE_SIDVA…)SMS_AUTH_SECRETopenssl rand -hex 32— internal shared secret, must match the Authentik SMS stage blueprintThen flip
smsService.enabled: trueas a separate commit, so the secret is provably present before the Deployment renders.Verification (real output)
Out of scope — flagged, not fixed
provisioning-serviceandbilling-serviceare also built by release.yml but also not anchored — the same latent bug class. Left alone deliberately: provisioning is disabled in prod (inert), and adding a billing anchor would silently re-tag the live money path — that deserves its own reviewed PR, not a rider on this one.SMTP_HOSTis not wired into email-service at all; that is the remaining gap beforerequireEmailVerificationcan be turned on.Nothing was hand-applied — prod is GitOps.
Known pre-existing failing checks, unrelated to this PR:
Playwright sign-in flow,OIDC plumbing,open-pr,gate-code-review.🤖 Generated with Claude Code